<script type="text/javascript">
	$(function() {
		var redirect="";
		$(".deleteBoton").click(function() {
			redirect = $(this)[0].href;
			$("#deleteWindow").dialog('open');
			return false;
		})	
		 

		
		$("#deleteWindow").dialog({
			bgiframe: true,
			resizable: false,
			autoOpen: false,			
			height:140,
			modal: true,
			overlay: {
				backgroundColor: '#000',
				opacity: 0.5
			},
			buttons: {
				'Borrar': function() {
					$(this).dialog('close');
					location.href=redirect;
					return false;
					
				},
				Cancel: function() {
					$(this).dialog('close');
					return false;
					
				}
			}
		});
	});
	</script>


<div id="deleteWindow" style="display:none"; title=__('action_delete',true)>
<p> <?php echo __('msg_user_delete'); ?></p>
</div>



<div class="kt-g1">
		<div class=" kt-right">
	   		<ul class="lst-tabs">
	   			<li id="icon-user-new" class="active" ><span class="icon"></span>  <?php echo $html->link(__('users_view',true),$ruta_admin.'/add');?> </li>	   		
	   			<li id="icon-user-new"><span class="icon"></span>  <?php echo $html->link(__('users_new',true),$ruta_admin.'/add');?> </li>
	   			<li id="icon-user-lst" ><span class="icon"></span> <?php echo $html->link(__('users_list',true),$ruta_admin.'/');?> </li>
	  		</ul>	  
		</div>
</div>
<div class="kt-md kt-md-content">
<div class="hd">
	<h2> <?php echo __('users_title_view'); ?> <strong>  <?php echo $users['User']['username'] ?> </strong></h2>
</div> 
<div class="bd lst-form">
<table class="lst-info"> 
	<tr class="form-field"> 
		<th>Id</th>
		<td><?php echo $users['User']['id']?></td>
	</tr>	
	
	<tr class="form-field"> 
		<th>Nombre de Usuario</th>
		<td><?php echo $users['User']['username']?></td>
	</tr>
	
	<tr class="form-field"> 
		<th>Email</th>
		<td><?php echo $users['User']['email']?></td>
	</tr>
	
	<tr class="form-field"> 
		<th>Roles</th>
		<td><?php echo $users['User']['role_id']?></td>
	</tr>
		
	<tr class="form-field"> 
		<th> Acciones </th>
		<td>
		<?php echo $html->link(__('action_edit',true), $ruta_admin."edit/".$users['User']['id']); ?>
		
		<?php echo $html->link(__('action_delete',true), $ruta_admin."delete/".$users['User']['id'], array('class' => 'deleteBoton')); ?>
		</td>
	</tr> 
</table>

</div>
<div class="ft">
<p>	<?php echo $html->link("Nuevo Usuario", $ruta_admin."add/");?> - <?php echo $html->link("volver", $ruta_admin); ?></p>
</div>
</div>